package com.wxx;

/**
 * @author: Jetwang
 * @date: 2022/3/21 21:23
 * @description: TestMain
 * @version: 1.0
 */
public class TestMain {
    public static void main(String[] args) {
        GenericArray<Integer> arr = new GenericArray<Integer>(10);
        for (int i = 0; i < 10; i++) {
            arr.addLast(i);
        }
        System.out.println(arr);
        arr.insert(2, 100);
        System.out.println(arr);

        arr.remove(2);
        arr.remove(3);
        System.out.println(arr);
        arr.addFirst(999);
        System.out.println(arr);
        System.out.println(arr.get(5));
        arr.removeElement(100);
        System.out.println(arr);

        GenericArray<Student> students = new GenericArray<>(20);
        students.addLast(new Student(22, "Jet"));
        students.addLast(new Student(23, "Jack"));
        students.addLast(new Student(24, "Jeffy"));
        System.out.println(students);
    }
}
